<!doctype html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script>
// This tests that we only preserve an empty paragraph's style when moving
// paragraphs around if the selection is still in an empty paragraph after the
// move occurs.
//
// The test passes if the text below is still underlined.
selection_test(
    [
        '<div contenteditable>',
            '<span style="text-decoration: underline;">abc</span>',
            '<div>|<br></div>',
        '</div>',
    ],
    'Delete',
    [
        '<div contenteditable>',
            '<span style="text-decoration: underline;">abc|</span>',
        '</div>',
    ]);
</script>
